<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>专家咨询订单管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/expertorder/expertConsultationOrder/">专家咨询订单列表</a></li>
		<li class="active"><a href="${ctx}/expertorder/expertConsultationOrder/form?id=${expertConsultationOrder.id}">专家咨询订单<shiro:hasPermission name="expertorder:expertConsultationOrder:edit">${not empty expertConsultationOrder.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="expertorder:expertConsultationOrder:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="expertConsultationOrder" action="${ctx}/expertorder/expertConsultationOrder/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>		
		<div class="control-group">
			<label class="control-label">支付渠道，alipay，wxpay：</label>
			<div class="controls">
				<form:input path="paymentChannel" htmlEscape="false" maxlength="10" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">订单状态，INIT-未付款；ONGOING-正在进行；CLOSE-结束：</label>
			<div class="controls">
				<form:input path="orderStatus" htmlEscape="false" maxlength="10" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">支付平台订单号：</label>
			<div class="controls">
				<form:input path="paymentTradeNo" htmlEscape="false" maxlength="100" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">咨询人用户ID：</label>
			<div class="controls">
				<sys:treeselect id="user" name="user.id" value="${expertConsultationOrder.user.id}" labelName="user.name" labelValue="${expertConsultationOrder.user.name}"
					title="用户" url="/sys/office/treeData?type=3" cssClass="" allowClear="true" notAllowSelectParent="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">专家ID：</label>
			<div class="controls">
				<form:input path="expertId" htmlEscape="false" maxlength="20" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">订单价格：</label>
			<div class="controls">
				<form:input path="orderPrice" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">支付成功实践：</label>
			<div class="controls">
				<input name="paymentSuccessDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
					value="<fmt:formatDate value="${expertConsultationOrder.paymentSuccessDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">聊天组ID：</label>
			<div class="controls">
				<form:input path="chatGroupId" htmlEscape="false" maxlength="40" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">文字聊天时间，时间单位为分钟，默认12个小时：</label>
			<div class="controls">
				<form:input path="textChatDuration" htmlEscape="false" maxlength="11" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">语音聊天时间，时间单位为分钟，默认20分钟：</label>
			<div class="controls">
				<form:input path="voiceChatDuration" htmlEscape="false" maxlength="11" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">备注：</label>
			<div class="controls">
				<form:textarea path="remarks" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">企业ID：</label>
			<div class="controls">
				<form:input path="institutionId" htmlEscape="false" maxlength="20" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="form-actions">
			<shiro:hasPermission name="expertorder:expertConsultationOrder:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>